Skip to content

feat(seer): Seer Code Review Overview section#111593

Merged
ryan953 merged 9 commits intomasterfrom
ryan953/seer-code-review-overview
Mar 26, 2026
Merged

feat(seer): Seer Code Review Overview section#111593
ryan953 merged 9 commits intomasterfrom
ryan953/seer-code-review-overview

Conversation

@ryan953
Copy link
Copy Markdown
Member

@ryan953 ryan953 commented Mar 26, 2026

Bring in the Seer Code-Review overview section behind the seer-overview feature flag.

SCR-20260325-pahy

And some stories to show the different states, mostly counts of things

1282-hayes-qd dev getsentry net_7999_stories_product_views_settings_seer_overview_codereviewoverviewsection_

@ryan953 ryan953 requested review from a team as code owners March 26, 2026 00:18
@ryan953 ryan953 requested a review from billyvg March 26, 2026 00:18
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 26, 2026
Comment thread static/gsApp/views/seerAutomation/settings.tsx Outdated
Comment thread static/gsApp/views/seerAutomation/settings.tsx Outdated
label={t('Enable Code Review by Default')}
hintText={t(
'For all new projects, select which coding agent Seer will hand off to when processing issues.'
)}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong hint text on code review toggle

Medium Severity

The hintText for the "Enable Code Review by Default" toggle says "For all new projects, select which coding agent Seer will hand off to when processing issues." This is unrelated copy — it describes coding agent handoff for projects, not code review for repos. The old version of this same toggle correctly said "For all new repos connected, Seer will review your PRs and flag potential bugs."

Fix in Cursor Fix in Web

Comment thread static/app/views/settings/seer/overview/codeReviewOverviewSection.tsx Outdated
Comment thread static/app/views/settings/seer/overview/useSeerOverviewData.spec.tsx Outdated
Comment thread static/app/views/settings/seer/overview/useSeerOverviewData.spec.tsx Outdated
integration.provider.features.includes('commits')
);
const seerIntegrations = scmIntegrations.filter(integration =>
isSupportedAutofixProvider({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my PR removed this and makes it more complicated when we need to call it in a loop. you have to import isSeerSupported... and the hook that returns supportedProviderIds.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Unconditional hook fetches data behind feature flag
    • Added enabled parameter to useCodeReviewOverviewSection hook that is passed to useInfiniteQuery, preventing unnecessary API calls when the seer-overview feature flag is disabled.

Create PR

Or push these changes by commenting:

@cursor push b780bc1936
Preview (b780bc1936)
diff --git a/static/app/views/settings/seer/overview/codeReviewOverviewSection.tsx b/static/app/views/settings/seer/overview/codeReviewOverviewSection.tsx
--- a/static/app/views/settings/seer/overview/codeReviewOverviewSection.tsx
+++ b/static/app/views/settings/seer/overview/codeReviewOverviewSection.tsx
@@ -24,7 +24,7 @@
 import {fetchMutation} from 'sentry/utils/queryClient';
 import {useOrganization} from 'sentry/utils/useOrganization';
 
-export function useCodeReviewOverviewSection() {
+export function useCodeReviewOverviewSection(enabled = true) {
   const organization = useOrganization();
 
   const queryOptions = organizationRepositoriesInfiniteOptions({
@@ -33,6 +33,7 @@
   });
   const repositoriesResult = useInfiniteQuery({
     ...queryOptions,
+    enabled,
     select: ({pages}) => {
       const repos = uniqBy(
         pages.flatMap(page => page.json),

diff --git a/static/gsApp/views/seerAutomation/settings.tsx b/static/gsApp/views/seerAutomation/settings.tsx
--- a/static/gsApp/views/seerAutomation/settings.tsx
+++ b/static/gsApp/views/seerAutomation/settings.tsx
@@ -44,7 +44,7 @@
   const showSeerOverview = organization.features.includes('seer-overview');
 
   const scmOverviewData = useSCMOverviewSection();
-  const codeReviewOverviewData = useCodeReviewOverviewSection();
+  const codeReviewOverviewData = useCodeReviewOverviewSection(showSeerOverview);
 
   const orgEndpoint = `/organizations/${organization.slug}/`;
   const orgMutationOpts = mutationOptions({

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment thread static/gsApp/views/seerAutomation/settings.tsx
@ryan953 ryan953 requested a review from a team as a code owner March 26, 2026 22:28
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@ryan953 ryan953 merged commit bef2044 into master Mar 26, 2026
73 of 75 checks passed
@ryan953 ryan953 deleted the ryan953/seer-code-review-overview branch March 26, 2026 22:51
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants